package org.domain.sigepac.session;

import java.util.Date;
import java.util.List;

import org.domain.sigepac.Entity.Aluno;
import org.domain.sigepac.repository.RepositorioAluno;
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Factory;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.datamodel.DataModel;

@Name("relatoriosAluno")
@Scope(ScopeType.CONVERSATION)
public class RelatoriosAluno {

	@In
	private RepositorioAluno repositorioAluno;

	@In(required=false)
	@Out(scope=ScopeType.CONVERSATION,required=false)
	private Date dataInicio=new Date();

	@In(required=false)
	@Out(scope=ScopeType.CONVERSATION,required=false)
	private Date dataFim=new Date();

	@DataModel
	private List<Aluno> alunos;

	@Factory("alunos")
	public void listar(){
		//return repositorioAluno.pesquisarPorPeriodo(dataInicio, dataFim);
		alunos=repositorioAluno.listar();
	}


	public Date getDataInicio() {
		return dataInicio;
	}
	public void setDataInicio(Date dataInicio) {
		this.dataInicio = dataInicio;
	}
	public Date getDataFim() {
		return dataFim;
	}
	public void setDataFim(Date dataFim) {
		this.dataFim = dataFim;
	}




}
